#define _CRT_SECURE_NO_WARNINGS 1

#include<iostream>
#include<vector>
#include<cmath>

using namespace std;

int nonSpecialCount(int l, int r) {
    int n = sqrt(r);
    vector<bool> v(n + 1);
    int res = r - l + 1;
    for (int i = 2; i <= n; i++)
        if (!v[i])
        {
            if (i * i >= l && i * i <= r)
                res--;
            for (int j = i * 2; j <= n; j += i)
                v[j] = true;
        }
    return res;
}